package dk.controlme.lego.tester;

import javax.swing.*;
import java.awt.*;
import java.awt.event.KeyEvent;

public class ViewConnect extends JFrame {
    private static final long serialVersionUID = 3141592653589793238L;
    public JButton buttonConnect;
    public JTextField textFieldName;

    public ViewConnect() {
        setSize(250,130);
        setTitle("ControlMe.DK test controller");
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setVisible(true);

        Toolkit toolkit = getToolkit();
        Dimension dimension = toolkit.getScreenSize();
        setLocation((dimension.width - getWidth()) / 2,
                    (dimension.height - getHeight()) / 2);

        JPanel panel = new JPanel();
        getContentPane().add(panel);
        panel.setLayout(null);
        panel.setFocusable(true);

        /*************************
         *         [NAME]        *
         *                       *
         *       [CONNECT]       *
         *                       *
         *                       *
         *                       *
         *                       *
         *                       *
         *************************/

        textFieldName = new JTextField("NXT navn");
        textFieldName.setBounds(75,5,100,25);
        panel.add(textFieldName);
        textFieldName.requestFocus();

        buttonConnect = new JButton("Connect");
        buttonConnect.setBounds(75,35,100,25);
        panel.add(buttonConnect);
    }

}
